package handlers

import (
	"context"

	pb "gokit_study/protos"
)

// NewService returns a naïve, stateless implementation of Service.
func NewService() pb.HiServer {
	return hiService{}
}

type hiService struct{}

func (s hiService) SayHello(ctx context.Context, in *pb.HiUser) (*pb.HiReply, error) {
	var resp pb.HiReply
	user := pb.HiUser{
		Name: "wangzhihui哈哈哈哈",
		Sex:  2,
	}
	resp.User = &user
	resp.Message = "Hi"
	return &resp, nil
}
